<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>


<html>
<head>
	<base href="<%=basePath%>">
	<script src="js/jquery-3.6.0.js"></script>
</head>
<body>
<table style="border-collapse: separate;border-spacing: 10px;table-layout: fixed;">
	<tr>
		<td style="width: 20%;text-align: center;">标题</td>
		<td style="width: 70%;text-align: center;">内容</td>
		<td>状态</td>
		<td>操作</td>
	</tr>
	<c:forEach items="${bulletins}" var="a">
		<tr>
			<td style="text-align: center;">${a.title}</td>
			<td style="text-align: center; ">${a.content}</td>
			<td>${a.status}</td>
			<td><a style="text-decoration: none;" href="jsp/update_bulletin.jsp?title=${a.title}&content=${a.content}&status=${a.status}&id=${a.id}"><img
					class="operation" src="img/update.png"></a>

			</td>
		</tr>
	</c:forEach>
	<div id="BtmBtn">
		<div class="btn_boxB floatR mag_l20">
			<button style="cursor: pointer;background-color: #4CAF50;color: white;padding: 12px 20px;display: inline-block;font-size: 15px;top: 80%;right: 12%;position: absolute;"><a style="color: white; text-decoration:none;" href="jsp/insert_bulletin.jsp">添加</a></button>
		</div>
		<div class="btn_box floatR">
			<button style="cursor: pointer;background-color: #4CAF50;color: white;padding: 12px 20px;display: inline-block;font-size: 15px;top: 80%;right: 5.5%;position: absolute;"><a style="color: white; text-decoration:none;" href="jsp/admin_view.jsp">返回</a></button>
		</div>
	</div>
</table>
</body>
</html>
